package cn.xiaou.utils;

import java.time.format.DateTimeFormatter;
import java.util.Locale;

public final class SmallToolBoxUtils {
	public final static String  version="2.2";
	/**
	 * 获取：DateTimeFormatter
	 * 格式：yyyy-MM-dd HH:mm:ss
	 * 时区：CHINA
	 */
	public static DateTimeFormatter ofPattern = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
	/**
	 * 获取：DateTimeFormatter
	 * 格式：yyyy-MM-dd 
	 * 时区：CHINA
	 */
	public static DateTimeFormatter ofPattern2 = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.CHINA);
	/**
	 *返回随机数
	 */
	public static String  getRandomInt(int number) {
		 String code = ((Long)System.currentTimeMillis()).toString();
		return code.substring(code.length()-number);
	}
	
	
	/*public static String modifyFilename(File path,String newFilename) {
		return path.getName().replaceAll(path.getName(),newFilename);
	}
	
	public static String modifyFilename(String pathStr,String newFilename) {
		return modifyFilename(new File(pathStr), newFilename);
	}*/
}
